#pragma once

#include "echo.pb.h"

#include <brpc/controller.h>

class EchoServiceImpl : public example::EchoService
{
public:
    EchoServiceImpl();
    ~EchoServiceImpl();

public:
    void Echo(google::protobuf::RpcController *controller,
              const example::EchoRequest      *request,
              example::EchoResponse           *response,
              google::protobuf::Closure       *done) override;

private:
    void CallAfterRpc(brpc::Controller *cntl, const google::protobuf::Message *req, const google::protobuf::Message *res);
};